﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/ManagementMaster.master" AutoEventWireup="true"
  CodeBehind="Comments.aspx.cs" Inherits="MONTRASEC_test.Management.Comments" Title="Comments"
  Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>

<!-- #include virtual="~/Multilingual.inc.aspx" -->
<asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpNavigation" runat="server">
  <ul class="clearfix">
    <li><a id="AMgt1" href="~/Management/Default.aspx" runat="server">
      <asp:Label ID="LabelMgt01" runat="server" Text="<%$ Resources:Resource1, Management_Home %>"></asp:Label></a></li>
    <li><a id="AMgt3" href="~/Management/Comments.aspx" runat="server">
      <asp:Label ID="LabelMgt03" runat="server" Text="<%$ Resources:Resource1, Manage_Comments %>"></asp:Label></a></li>
  </ul>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="server">
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
      <br />
      <br />
      <asp:GridView ID="gvComments" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" DataSourceID="sdsCommentsByUser" PageSize="5" meta:resourcekey="GridView1Resource1"
        DataKeyNames="ID">
        <Columns>
          <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
            SortExpression="ID" />
          <asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" />
          <asp:BoundField DataField="FormName" HeaderText="Form Name" SortExpression="FormName" />
          <asp:BoundField DataField="FieldName" HeaderText="Field Name" SortExpression="FieldName" />
          <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
        </Columns>
      </asp:GridView>
      <asp:Button ID="btnCreateExcel" runat="server" Text="Create an Excel sheet" CssClass="button"
        OnClick="btnCreateExcel_Click" Visible="False" />
      <asp:SqlDataSource ID="sdsCommentsByUser" runat="server" ConnectionString="<%$ ConnectionStrings:montrasecConnectionString %>"
        SelectCommand="SELECT Username, Comment, FormName, FieldName, ID FROM USER_COMMENTS ">
      </asp:SqlDataSource>
    </ContentTemplate>
  </asp:UpdatePanel>
</asp:Content>
